package com.util.download;

import com.util.download.core.DownLoader;
import com.util.download.util.LogUtil;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        String url = null;

        if(args == null ||args.length == 0){
            for (;;){
                LogUtil.info("请输入下载链接地址");
                Scanner scanner = new Scanner(System.in);
                url = scanner.next();
                if(url!=null){
                    break;
                }
            }
        }else{
            url = args[0];
        }
        System.out.println(url);
        DownLoader downLoader = new DownLoader();
        downLoader.download(url);
    }
}
